<response>
<token><?php echo $token; ?></token>
<assessment>
<questiongroups>
<questiongroup_count><?php echo count($assessment['Questiongroup']);?></questiongroup_count>
<?php
	
	$questiongroup_count = 0;

	foreach ($assessment['Questiongroup'] as $questiongroup){
?>
<questiongroup_<?php echo $questiongroup_count?>>
<questiongroup_url_<?php echo $questiongroup_count?>><?php echo $base_url.'/asessions/questiongroup_xml/'.$token.'/'.$questiongroup['id'];?></questiongroup_url_<?php echo $questiongroup_count?>>
<questiongroup_action_<?php echo $questiongroup_count?>><?php echo $questiongroup['action'];?></questiongroup_action_<?php echo $questiongroup_count?>>
<question_count_<?php echo $questiongroup_count?>><?php echo count($questiongroup['Question']);?></question_count_<?php echo $questiongroup_count; ?>>
<questions>
<?php 
	
		$question_count = 0;

		foreach ($questiongroup['Question'] as $question){
?>
<question_<?php echo $questiongroup_count?>_<?php echo $question_count?>><?php echo $base_url.'/asessions/question_xml/'.$token.'/'.$question['id'];?></question_<?php echo $questiongroup_count?>_<?php echo $question_count?>>
<question_action_<?php echo $questiongroup_count?>_<?php echo $question_count?>><?php echo $question['action'];?></question_action_<?php echo $questiongroup_count?>_<?php echo $question_count?>>
<?php
			$question_count++;
		}
?>
</questions>
</questiongroup_<?php echo $questiongroup_count?>>
<?php
		$questiongroup_count++;
	}
?>
</questiongroups>
</assessment>
</response>
